import requestes from "../../utils/requestes"
enum API {
    // 主题接口
    THEME = '/moment/activityZones/collect/default?access_token=',
    // 分类接口
    CATEGORY = '/moment/properties/filter/vip_zone?access_token=',
    // 视频列表接口
    VIDEOLIST ='/moment/moments/collect/vip_zone/integrated?access_token=',
    // 销量高低接口
    SALETOP = '/moment/moments/collect/vip_zone/sellCountDesc?access_token=',
    // 浏览量
    GLANCE = '/moment/moments/collect/vip_zone/viewCountDesc?access_token=',
    // 发布时间
    CREATIMTE = '/moment/moments/collect/vip_zone/onsellTimeDesc?access_token=',
    // 价格高到低--降序
    PRICETOP = '/moment/moments/collect/vip_zone/priceDesc?access_token=',
    // 价格低到高--升高
    PRICELOD = '/moment/moments/collect/vip_zone/priceAsc?access_token=',
    // 评价从高到低
    COMMIT = '/moment/moments/collect/video_course/favorableValueDesc?access_token='
}
const access_token = 'fc69476c-1f1f-4b12-9d0f-4ec70d931284'
// 分类请求
export const reqCategory = ()=>requestes.get(API.CATEGORY+access_token)
// 视频列表请求
export const reqVideoList = (pageSize:number,pageNum:number,filter)=>requestes.post(API.VIDEOLIST+access_token+`&pageSize=${pageSize}&pageNum=${pageNum}`,filter)
// 销量由高到低接口
export const reqSale = (pageSize:number,pageNum:number)=>requestes.post(API.SALETOP+access_token+`&pageSize=${pageSize}&pageNum=${pageNum}`,{})
// 浏览量
export const reqGlance = (pageSize:number,pageNum:number)=>requestes.post(API.GLANCE+access_token+`&pageSize=${pageSize}&pageNum=${pageNum}`,{})
// 发布时间
export const reqTime = (pageSize:number,pageNum:number)=>requestes.post(API.CREATIMTE+access_token+`&pageSize=${pageSize}&pageNum=${pageNum}`,{})
// 价格降序
export const reqToplod = (pageSize:number,pageNum:number)=>requestes.post(API.PRICETOP+access_token+`&pageSize=${pageSize}&pageNum=${pageNum}`,{})
// 价格升序
export const reqLodtop = (pageSize:number,pageNum:number)=>requestes.post(API.PRICELOD+access_token+`&pageSize=${pageSize}&pageNum=${pageNum}`,{})
// 评价从高到低接口
export const reqCommit = (pageSize:number,pageNum:number)=>requestes.post(API.COMMIT+access_token+`&pageSize=${pageSize}&pageNum=${pageNum}`,{})
// 主题请求
export const reqTheme = ()=>requestes.get(API.THEME+access_token+`&pageSize=16`)
